<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Title</title>
</head>
<body>
<script>
  // toString: 把对象转成字符串
  // let arr = [1, 2, 3];
  // console.log(arr.toString());

  // 利用toString做类型判断
  let arr = 123;

  console.log(Object.prototype.toString.call(arr));
</script>
</body>
</html>
